refactor(cli): migrate from citty to commander.js#53
Merged
Conversation
…on-options) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ndency - Migrate repo, space, document, category, milestone, status, notification, and issue-type commands from citty to commander - Delete legacy command-usage.ts and common-args.ts - Remove citty dependency - Change resolveOptions to void (side-effect only) to avoid unnecessary type assertions on opts - Remove all redundant `as` casts from command files - Fix Option naming conflict in issue/list.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused BacklogOption import from issue/list.ts - Simplify nested ternary in api.ts to typeof check Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Commander's addCommands() requires default exports from command modules. Disable no-default-export rule for apps/cli/src/commands/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Commands like `project view`, `project users`, `project activities`, `project delete`, `project edit`, `repo list`, `wiki list`, `wiki count`, and `wiki tags` should accept project as a positional argument per the documented CLI interface, not as a --project/-p option. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…line completions - Use resolveUserId for @me in issue list, issue count, issue edit, and pr list commands (previously passed NaN to API) - Unify user activities --activity-type to comma-separated format, matching space and project activities commands - Inline shell completion scripts as string literals so they work in the bundled dist output (previously failed with ENOENT) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ble options
Replace splitArg/split(",") patterns with commander's native argParser
for repeatable options. This is the idiomatic commander.js approach:
--activity-type 1 --activity-type 2 (instead of --activity-type 1,2)
--status open --status merged (instead of --status open,merged)
Also replace `as number[]` with `satisfies number[]` throughout, and
add @me support to pr count command's assignee option.
Note: -p/--project with .env("BACKLOG_PROJECT") retains comma-separated
parsing since env vars provide a single string value.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…type cast
- Remove completions/bash.sh, zsh.zsh, fish.fish (now inlined in completion.ts)
- Remove `as { json?: string }` cast in dashboard.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cittyCLI framework withcommander.jsacross the entire CLI application (~170 files)BeeCommandclass extending commander'sCommandwith customexamples(),envVars(),addCommands()methods andhelpInformation()overrideRequiredOptionclass with interactive prompting viaresolveOptions()common-options.tsfactory functions and centralizederror.tshandlercommand-usage.tsandcommon-args.ts, remove citty dependencyexport defaultandparseAsync()patternsresolveOptions()returnsvoid(side-effect only) to avoid unnecessary type assertionsWhy
--notify 1 --notify 2) without customsplitArghelpInformation()overrideas nevertest casts — commander'sparseAsync()is naturally typedTest plan
🤖 Generated with Claude Code